package api.sea;

import conf.Url;
import util.HttpClientUtils;
import util.ResponseData;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;

public class LoginApi {
    private static final String login_url= Url.Base_Url+ "consumer/system/login?code=fhic";
    public static ResponseData login(String username,String password) throws IOException, URISyntaxException {
        Map<String, Object> data=new HashMap<>();
        if(username!=null){
            data.put("username",username);
        }if(password!=null){
            data.put("password",password);
        }
        return HttpClientUtils.post_json(login_url,data);
    }

}
